package com.singerw.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.awt.color.ICC_Profile;
import java.io.Serializable;

/**
 * @version V1.0
 * @Package com.singerw.pojo
 * @auhter 张欣
 * @date 2021/1/2-6:59 PM
 */
@NoArgsConstructor
public class Result<T> implements Serializable {
    private Integer code;
    private String msg;
    private T data;

    public Result(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public Integer getCode() {
        return code;
    }

    public Result setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public Result setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public T getData() {
        return data;
    }

    public Result setData(T data) {
        this.data = data;
        return this;
    }


    public Result setCode(ResultEnum resultEnum) {
        this.code = resultEnum.code;
        return this;
    }

}
